package com.ruoyi.media.mpQrcodeData.mapper;

import com.ruoyi.media.mpQrcodeData.domain.MediaMpQrcodeData;
import com.ruoyi.media.mpQrcodeData.domain.vo.MediaMpQrcodeDataVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 微信群二维码数据Mapper接口
 *
 * @author dqw
 * @date 2023-04-25
 */
public interface MediaMpQrcodeDataMapper extends BaseMapperPlus<MediaMpQrcodeDataMapper, MediaMpQrcodeData, MediaMpQrcodeDataVo> {

    /**
     * 根据主键关联id获取对应数量
     * @param linkId
     * @return
     */
    @Select("SELECT COUNT(1) FROM media_mp_qrcode_data where link_id = #{linkId}")
    int getDataCount(@Param("linkId")String linkId);
}
